<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('Customer/index')}">客户列表</a></li>
			<li class="active"><a href="{:U('Customer/edit')}">编辑客户</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="{:U('Customer/edit')}">
			<fieldset>
				<div class="control-group">
					<label class="control-label">客户姓名</label>
					<div class="controls">
						<input type="text" name="customer_name" value="{$customer_info['customer_name']}" required="required">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">手机号</label>
					<div class="controls">
						<input type="text" name="mobile" value="{$customer_info['mobile']}" >
					</div>
				</div>
				<div class="control-group" style="display: none">
					<label class="control-label">客户性别</label>
					<div class="controls">
						<input name="sex" type="radio" value="1" <if condition="$customer_info['sex'] eq '1'">checked</if>/>男&nbsp;
						<input name="sex" type="radio" value="2" <if condition="$customer_info['sex'] eq '2'">checked</if>/>女&nbsp;
						<input name="sex" type="radio" value="0" <if condition="$customer_info['sex'] eq '0'">checked</if>/>保密&nbsp;
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">客户类型</label>
					<div class="controls">
						<foreach name="customer_type_list" item="vo">
							    <input name="customer_type_id" type="radio" value="{$vo['id']}" required="required" <if condition="$customer_info['customer_type_id'] eq $vo['id']">checked</if>/>&nbsp;&nbsp;{$vo['name']}&nbsp;（{$vo['memo']}）<br/>
						</foreach>
					</div>
				</div>
				<div class="control-group">
						<label class="control-label">账号状态</label>
					<div class="controls">

						<foreach name="customer_status_list" item="vo" >
						    <input name="status" type="radio" value="{$vo['key']}" <if condition="$customer_info['status'] eq $vo['key']">checked</if> <if condition="$vo['key'] eq '0' || $vo['key'] eq '2' || $vo['key'] eq '3'">disabled="disabled"</if>/>{$vo['value']}&nbsp;
                        </foreach>
					</div>
				</div>
				
				<div class="control-group time-limit">
					<label class="control-label">激活时间</label>
					<div class="controls">
						<input style="width:150px" id="active_time" type="date" name="active_time" value="{$customer_info['active_time'] || date='Y-m-d',###}" required="required" disabled="disabled"/>
					</div>
				</div>

				<div class="control-group time-limit">
					<label class="control-label">过期时间</label>
					<div class="controls">
						<input style="width:150px" id="expiration_time" type="date" name="expiration_time" value="{$customer_info['expiration_time'] || date='Y-m-d',###}" required="required" disabled="disabled"/>
					</div>
				</div>

				<div class="control-group">
						<label class="control-label">账户金额</label>
					<div class="controls">
						<input type="text" name="money" value="{$customer_info['money']}" disabled="true">
					</div>
					<input type="hidden" name="id" value="{$customer_info['id']}">
				</div>
			</fieldset>
			<div class="form-actions">
				<button type="submit" class="btn  btn-danger js-ajax-submit">保存</button>
				<a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
			</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>